<?php
namespace app\adm\controller;
use think\Controller;
use think\Db;
use think\Request;

/**
 * 后台用户管理
 */
class User extends Index{
	public function __construct(Request $request){
		parent::__construct($request);
	}
	//用户列表
	public function user_list(){
		$page=Db::name('user')->paginate(8,false,['type' => 'bootstrap','var_page' => 'page',]);
		$userlist = $page->all();
		// dump($userlist);die;
		$this->assign('page',$page);
		$this->assign('userlist',$userlist);
		return $this->fetch('userlist',['title'=>'用户列表']);
	}
	//相册列表
	public function photolist(){
		$page=Db::name('photos')->paginate(8,false,['type' => 'bootstrap','var_page' => 'page',]);
		$photolist = $page->all();
		// dump($photolist);die;
		$this->assign('page',$page);
		$this->assign('photolist',$photolist);
		return $this->fetch('photolist',['title'=>'相册列表']);
	}
	//传记列表
	public function zhuanjilist(){
		$page=Db::name('zhuanji')->paginate(8,false,['type' => 'bootstrap','var_page' => 'page',]);
		$zhuanjilist = $page->all();
		$this->assign('page',$page);
		$this->assign('zhuanjilist',$zhuanjilist);
		return $this->fetch('zhuanjilist',['title'=>'传记列表']);
	}
}
?>